<?php

//TODO Renommer les id et class des champs pour le css pour avoir quelques chose de plus propre
function formAuthentification($action){
  Doo::loadHelper('DooForm');
  $form = new DooForm(array(
         'method' => 'post',
         'action' => $action,
       'attributes' => array('id' => 'main-screen-login-form'),
         'elements' => array(
         'login' => array('text', array(
             'required' => true,
             'label' => "Login",
         'field-wrapper' => 'div',
         'attributes' => array('class' => 'required', 'type_validate' => 'str_max32'),
             'validators' => array(
                 array('required','Field required'),
                 array('maxlength',32,'This is too long')
             )
        )),
        'passwd' => array('password', array(
             'required' => true,
             'label' =>'Mot de passe',
         'field-wrapper' => 'div',
           'attributes' => array('class' => 'required', 'type_validate' => 'str_max32'),
             'validators' => array(
                 array('required','Field required'),
                 array('maxlength',32,'This is too long')
             )
        )),'submit' => array('submit', array(
            'label' => "Connexion",
            'field-wrapper' => 'div'
        ))
     ),
    ));
    return $form;
}


?>